#ifndef __DISPLAY_H_
#define __DISPLAY_H_

//界面仿照win10的计算器，仅完成了界面部分，运算部分没写。
#define BUTTON_W SCRW*25/108         //按键宽度
#define BUTTON_H SCRH*35/384         //按键高度
#define BUTTON_D (SCRW-BUTTON_W*4)/5 //按键间距
#define BUTTON_N  20                 //按键数量

rectst display;
display.x=BUTTON_D+10;
display.y=BUTTON_D*9+10;
display.w=SCRW-2*BUTTON_D-20;
display.h=BUTTON_H*2+BUTTON_D*2-20;

colorst rgb;
rgb.r=0;
rgb.g=0;
rgb.b=0;

void textDisplay(char *text)
{
    drect(BUTTON_D,BUTTON_D*9,SCRW-2*BUTTON_D,BUTTON_H*2+BUTTON_D*2,180,180,180);
    drect(BUTTON_D+10,BUTTON_D*9+10,SCRW-2*BUTTON_D-20,BUTTON_H*2+BUTTON_D*2-20,230,230,230);
    dtextex(text,BUTTON_D+10,BUTTON_D*9+10,&display,&rgb,0,0);
    ref(BUTTON_D,BUTTON_D*9,SCRW-2*BUTTON_D,BUTTON_H*2+BUTTON_D*2);
}

#endif
